package com.easylinkin.linkappapi.rulecomponent.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 配电房
 * </p>
 *
 * @author TongJie
 * @since 2020-08-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("linkapp_rule_component")
public class RuleComponent extends Model<RuleComponent> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("id")
    private String id;

    /**
     * 名称
     */
    @TableField("name")
    private String name;

    /**
     * 区域id
     */
    @TableField("type")
    private String type;
    
    @TableField(exist=false)
    private String[] types;

    /**
     * 描述
     */
    @TableField("description")
    private String description;

    /**
     * 租户id
     */
    @TableField("tenant_id")
    private String tenantId;
    
    @TableField("cron")
    private String cron;
    
    @TableField("device_unit_id")
    private String deviceUnitId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField("modify_time")
    private Date modifyTime;

    /**
     * 创建人id
     */
    @TableField("creator")
    private String creator;

    /**
     * 修改人id
     */
    @TableField("modifier")
    private String modifier;
    
    @TableField(exist=false)
    private List<RuleComponentAttribute> ruleComponentAttributes;
    
    @TableField(exist=false)
    private List<RuleComponentService> ruleComponentServices;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
